 //由于模块都一次性加载，因此不用执行 layui.use() 来加载对应模块，直接使用即可：
 ;!function () {

  var layer = layui.layer;
  var form = layui.form;
      var $ = layui.jquery; //独立版的layer无需执行这一句
 //触发事件
 var active = {
  editmy: function(){
    var that = this; 
      //多窗口模式，层叠置顶
      layer.open({
        type: 2 //此处以iframe举例
        ,title: '修改'
        ,area: ['600px', '500px']
        ,shade: 0
        ,maxmin: true
        ,offset: [ //为了演示，随机坐标
        0
        ,0
        ] 
        ,content: '/my/editmy'
        ,btn: ['关闭'] //只是为了演示
        ,yes: function(){
          // $(that).click(); 
          layer.closeAll();
          window.location.reload();
        }
        // ,btn2: function(){
        //   layer.closeAll();
        // }
        
        ,zIndex: layer.zIndex //重点1
        ,success: function(layero){
          layer.setTop(layero); //重点2
        }
      });
    },
  editedu: function(){
    var that = this; 
      //多窗口模式，层叠置顶
      layer.open({
        type: 2 //此处以iframe举例
        ,title: '修改'
        ,area: ['600px', '500px']
        ,shade: 0
        ,maxmin: true
        ,offset: [ //为了演示，随机坐标
        0
        ,0
        ] 
        ,content: '/my/editedu'
        ,btn: ['关闭'] //只是为了演示
        ,yes: function(){
          // $(that).click(); 
          layer.closeAll();
          window.location.reload();
        }
        // ,btn2: function(){
        //   layer.closeAll();
        // }
        
        ,zIndex: layer.zIndex //重点1
        ,success: function(layero){
          layer.setTop(layero); //重点2
        }
      });
    },
    editexper: function(){
      var that = this; 
      //多窗口模式，层叠置顶
      layer.open({
        type: 2 //此处以iframe举例
        ,title: '修改'
        ,area: ['600px', '500px']
        ,shade: 0
        ,maxmin: true
        ,offset: [ //为了演示，随机坐标
        0
        ,0
        ] 
        ,content: '/my/editexper'
        ,btn: ['关闭'] //只是为了演示
        ,yes: function(){
          // $(that).click(); 
          layer.closeAll();
          window.location.reload();
        }  
        ,zIndex: layer.zIndex //重点1
        ,success: function(layero){
          layer.setTop(layero); //重点2
        }
      });
  },
   edithobby: function(){
    var that = this; 
      //多窗口模式，层叠置顶
      layer.open({
        type: 2 //此处以iframe举例
        ,title: '修改'
        ,area: ['600px', '500px']
        ,shade: 0
        ,maxmin: true
        ,offset: [ //为了演示，随机坐标
        0
        ,0
        ] 
        ,content: '/my/editHobby'
        ,btn: ['关闭'] //只是为了演示
        ,yes: function(){
          // $(that).click(); 
          layer.closeAll();
          window.location.reload();
        }
        // ,btn2: function(){
        //   layer.closeAll();
        // }
        
        ,zIndex: layer.zIndex //重点1
        ,success: function(layero){
          layer.setTop(layero); //重点2
        }
      });
    },
    editcampus: function(){
    var that = this; 
      //多窗口模式，层叠置顶
      layer.open({
        type: 2 //此处以iframe举例
        ,title: '修改'
        ,area: ['600px', '500px']
        ,shade: 0
        ,maxmin: true
        ,offset: [ //为了演示，随机坐标
        0
        ,0
        ] 
        ,content: '/my/editCampus'
        ,btn: ['关闭'] //只是为了演示
        ,yes: function(){
          // $(that).click(); 
          layer.closeAll();
          window.location.reload();
        }
        // ,btn2: function(){
        //   layer.closeAll();
        // }
        
        ,zIndex: layer.zIndex //重点1
        ,success: function(layero){
          layer.setTop(layero); //重点2
        }
      });
    },
    editself: function(){
    var that = this; 
      //多窗口模式，层叠置顶
      layer.open({
        type: 2 //此处以iframe举例
        ,title: '修改'
        ,area: ['600px', '500px']
        ,shade: 0
        ,maxmin: true
        ,offset: [ //为了演示，随机坐标
        0
        ,0
        ] 
        ,content: '/my/editSelf'
        ,btn: ['关闭'] //只是为了演示
        ,yes: function(){
          // $(that).click(); 
          layer.closeAll();
          window.location.reload();
        }
        // ,btn2: function(){
        //   layer.closeAll();
        // }
        
        ,zIndex: layer.zIndex //重点1
        ,success: function(layero){
          layer.setTop(layero); //重点2
        }
      });
    },
    editwork: function(){
    var that = this; 
      //多窗口模式，层叠置顶
      layer.open({
        type: 2 //此处以iframe举例
        ,title: '修改'
        ,area: ['600px', '500px']
        ,shade: 0
        ,maxmin: true
        ,offset: [ //为了演示，随机坐标
        0
        ,0
        ] 
        ,content: '/my/editwork'
        ,btn: ['关闭'] //只是为了演示
        ,yes: function(){
          // $(that).click(); 
          layer.closeAll();
          window.location.reload();
        }
        // ,btn2: function(){
        //   layer.closeAll();
        // }
        
        ,zIndex: layer.zIndex //重点1
        ,success: function(layero){
          layer.setTop(layero); //重点2
        }
      });
    }
    };
  
  $('.layui-btn').on('click', function(){
    var othis = $(this), method = othis.data('method');
    active[method] ? active[method].call(this, othis) : '';
  });
  
        // layer.msg('Hello World');
}();